﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BBICMS.Model.ViewModel.Front
{
   public  class ProductVM
    {
        public int ProductId { get; set; }
        public string ProductNo { get; set; }
        public string ProductName { get; set; }
        public string Summary { get; set; }
        public string Thumbnail { get; set; }
        public string ImageUrl { get; set; }
        public string ViewImage { get; set; }
        public string CategoryIds { get; set; }


        public string ClassName
        {
            get
            {
                if (!string.IsNullOrEmpty(this.CategoryIds))
                {
                    string[] q = (from i in this.CategoryIds.Split(',')
                                  select string.Format("cate{0}", i)).ToArray();
                    return string.Join(" ", q);
                }

                return string.Empty;
            }


        }
    }
}
